<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>邮件详情</h2>
    </div>

    <div class="tab-wrap with-padding">
        <ul class="nav nav-secondary">


        <li><a href="{:U('Admin/Addons/adminList',array('name'=>'Mail'))}">邮件配置</a></li>
        <li><a href="{:addons_url('Mail://Mail/mailList')}">邮箱列表</a></li>
        <li><a href="{:addons_url('Mail://Mail/sendEmail')}">发送邮件</a></li>
        <li class="active"><a href="{:addons_url('Mail://Mail/history')}">邮件历史</a></li>

    </ul>

<div style="width: 400px;padding-bottom: 50px;">
    <div class="form-item cf">
        <label class="item-label">邮件标题<span class="check-tips"></span></label>
        <div class="controls">
            <input type="text" class="text input-large form-control" name="title" value="{$history.title}">
        </div>
    </div>

    <div class="form-item cf">
        <label class="item-label">邮件内容<span class="check-tips"></span></label>
        <div class="controls">
            {:W('Common/Ueditor/editor',array('body','body',$history['body'],'400px','300px'))}
        </div>
    </div>

    <div class="form-item cf">
        <label class="item-label">发送时间<span class="check-tips"></span></label>
        <div class="controls">
            <input type="text" class="text input-large form-control" name="create_time" value="{:date('Y-m-d H:i:s',$history['create_time'])}">
        </div>
    </div>

    <div class="form-item cf">
        <label class="item-label">寄件人<span class="check-tips"></span></label>
        <div class="controls">
            <input type="text" class="text input-large form-control" name="from" value="{$history.from}">
        </div>
    </div>
</div>


    <div class="main-title">
        <h2>发送的邮箱列表</h2>
    </div>

    <div class="data-table table-striped">
        <table class="table table-hover">
            <thead>
            <tr>
                <th class="row-selected">
                    <input class="checkbox check-all" type="checkbox">
                </th>
                <th>邮箱地址</th>
                <th>状态</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="link">
                <volist name="link" id="vo">
                    <tr>
                        <td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$vo.id}"></td>
                        <td>{$vo.to}</td>
                        <td><if condition="$vo['status'] eq 1"><span style="color: green">发送成功</span><else/><span style="color: red">发送失败</span></if></td>
                    </tr>
                </volist>
                <else/>
                <td colspan="6" class="text-center"> aOh! 暂时还没有内容! </td>
            </notempty>
            </tbody>
        </table>

    </div>

        </div>
</block>
